/**
 * Copyright &copy; 2015-2020 <a href="http://www.jeeplus.org/">JeePlus</a> All rights reserved.
 */
package com.jeeplus.modules.userbank.service;

import java.util.List;

import com.jeeplus.modules.member.entity.Member;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.jeeplus.core.persistence.Page;
import com.jeeplus.core.service.CrudService;
import com.jeeplus.modules.userbank.entity.Userbank;
import com.jeeplus.modules.userbank.mapper.UserbankMapper;

/**
 * 用户银行卡Service
 * @author freedom
 * @version 2020-09-26
 */
@Service
@Transactional(readOnly = true)
public class UserbankService extends CrudService<UserbankMapper, Userbank> {

	public Userbank get(String id) {
		return super.get(id);
	}
	
	public List<Userbank> findList(Userbank userbank) {
		return super.findList(userbank);
	}
	
	public Page<Userbank> findPage(Page<Userbank> page, Userbank userbank) {
		dataRuleFilter(userbank);
		userbank.setPage(page);
		List<Userbank> list = mapper.findBankList(userbank);
		page.setList(list);
		return page;
//		return super.findPage(page, userbank);
	}
	
	@Transactional(readOnly = false)
	public void save(Userbank userbank) {
		super.save(userbank);
	}
	
	@Transactional(readOnly = false)
	public void delete(Userbank userbank) {
		super.delete(userbank);
	}

	public Userbank getByMember(String memberid) {
		return mapper.getByMember(memberid);
	}
	
}